<?php
$this->pageTitle=Yii::app()->name . ' - Írj';
$this->breadcrumbs=array(
	'Contact',
);
?>

<style>
#contact-form input, #contact-form textarea{
    color:#222;
    border: #222 solid 1px;
}

#contact-form label{
    font-weight: bold;
}

#contact-form input[type=submit]{
    font-size: 16px;
    padding:6px;
    width:95%;
}



</style>

<div class="span5">


<?php if(Yii::app()->user->hasFlash('contact')): ?>

<div class="alert alert-block alert-success fade in span4">
	<?php echo Yii::app()->user->getFlash('contact'); ?>
</div>

<?php  else: ?>

<h3>Írj nekünk!</h3>
<hr />
<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'contact-form',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
)); ?>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'name'); ?>
		<?php echo $form->textField($model,'name'); ?>
		<?php echo $form->error($model,'name'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'email'); ?>
		<?php echo $form->textField($model,'email'); ?>
		<?php echo $form->error($model,'email'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'body'); ?>
		<?php echo $form->textArea($model,'body',array('rows'=>6, 'cols'=>10, 'class'=>'span4')); ?>
		<?php echo $form->error($model,'body'); ?>
	</div>

	<?php if(CCaptcha::checkRequirements()): ?>
	<div class="row">
		<?php echo $form->labelEx($model,'verifyCode'); ?>
		<div>
		<?php $this->widget('CCaptcha'); ?>
		<?php echo $form->textField($model,'verifyCode'); ?>
		</div>
		<div class="hint">Írd be a hitelesítő kódot.</div>
        <br />
		<?php echo $form->error($model,'verifyCode'); ?>
	</div>
	<?php endif; ?>

	<div class="row buttons">
		<?php echo CHtml::submitButton('Elküld',array('class'=>'btn btn-primary large')); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->

<?php endif; ?>

</div>